package j04zuoye.raise;

public class RaiseTest {
    public static void main(String[] args) {
        Person person = new Person();
        person.raiseAnimal(new Animal("白素贞蛇",17) {
            @Override
            public void eat() {
                System.out.println(name+"，吃米饭");
            }
        });

        person.raiseAnimal(new Animal("田园猫",2) {
            @Override
            public void eat() {
                System.out.println(name+"，吃老鼠");
            }
        });

        Animal a1 = new Animal() {
            @Override
            public void eat() {

            }
        };
//        a1.name
    }
}
